﻿///***************************************************************
/// 시  스  템 : Updms.Com.Dac
/// 단위시스템 : COM
/// 계      층 : Data Access Layer
/// 프로그램명 : Com_Dac_UPDMS_COM_PGM_GRANT
/// 파  일  명 : Com_Dac_UPDMS_COM_PGM_GRANT.cs
/// 설      명 : 프로그램권한
///***************************************************************
/// 수정ID 일자       이름     내용
///---------------------------------------------------------------
/// CH001  2008-07-28 송시명   최초 작성
///***************************************************************
using System.Data;
using System.Data.SqlClient;
using System.EnterpriseServices;
using System.Runtime.InteropServices;

using SMFramework.Data;


namespace Updms.Com.Dac
{
	[ComVisible(true)]
	[Transaction(TransactionOption.Supported)]
	[JustInTimeActivation(true)]
	public class Com_Dac_UPDMS_COM_PGM_GRANT : Base.AppFramework.DacBase
	{
		public Com_Dac_UPDMS_COM_PGM_GRANT()
		{
		}

		#region NT [GetPgmInfo]

		[AutoComplete]
		public DataSet GetPgmInfo(string ls_lang_set)
		{
			string strSql = "usp_UPDMS_COM_PGM_GRANT_Get_Pgm_Info";

			SqlParameter[] paramArray =
			{
				new SqlParameter("ls_lang_set", ls_lang_set)
			};
			DataSet ds = new DataSet();
			return _agent.Fill(strSql, "UPDMS_COM_PGM_GRANT", ds, paramArray, CommandType.StoredProcedure);
		}
		
		#endregion

		#region NT [GetPgmListByUserDiv]

		[AutoComplete]
		public DataSet GetPgmListByUserDiv(string ls_user_div, string ls_lang_set)
		{
			string strSql = "usp_UPDMS_COM_PGM_GRANT_Get_Pgm_List_By_User_Div";

			SqlParameter[] paramArray =
			{
				new SqlParameter("ls_user_div", ls_user_div),
				new SqlParameter("ls_lang_set", ls_lang_set)
			};
			DataSet ds = new DataSet();
			return _agent.Fill(strSql, "UPDMS_COM_PGM_GRANT", ds, paramArray, CommandType.StoredProcedure);
		}

		#endregion

		#region RT [Insert]
		
		[AutoComplete]
		public int Insert(DataPack lo_dp)
		{
			string ls_sql = "usp_UPDMS_COM_PGM_GRANT_Insert_Xml";

			SqlParameter[] paramArray = lo_dp.ToSqlParameters();
			return _agent.ExecuteNonQuery(ls_sql, paramArray, CommandType.StoredProcedure);
		}
		
		#endregion

		#region RT [Update]
		/*
		[AutoComplete]
		public int Update(DataPack lo_dp)
		{
			string strSql = "usp_[TABLENAME]_Update";

			//데이터팩 로깅
			string ls_src = "Com_Dac_UPDMS_COM_CD.Update." + strSql;

			SMEventLog.WriteDataLog(ls_src, lo_dp);
			
			SqlParameter[] paramArray = lo_dp.ToSqlParameters();
			return _agent.ExecuteNonQuery(strSql, paramArray, CommandType.StoredProcedure);
		}
		*/
		#endregion

		#region RT [Delete]
		/*
		[AutoComplete]
		public int Delete(string ls_seq)
		{
			string strSql = "usp_[TABLENAME]_Delete";

			SqlParameter[] paramArray =
			{
				new SqlParameter("Seq", ls_seq)
			};
			
			return _agent.ExecuteNonQuery(strSql, paramArray, CommandType.StoredProcedure);
		}
		*/
		#endregion
	}
}
